import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home/Home.vue'
import Chat from "./views/Chat/Chat";
import Me from "./views/Me/Me";
import Recommend from "./views/Recommend/Recommend";
import Search from "./views/Search/Search";
import Hot from "./views/Home/Children/Hot/Hot";
import Box from "./views/Home/Children/Box";
import Dress from "./views/Home/Children/Dress";
import Ele from "./views/Home/Children/Ele";
import Food from "./views/Home/Children/Food";
import General from "./views/Home/Children/General";
import Man from "./views/Home/Children/Man";
import Mbaby from "./views/Home/Children/Mbaby";
import Shirt from "./views/Home/Children/Shirt";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      name: 'home',
      component: Home,
      children:[
        {path:'hot',name:'hot',component:Hot},
        {path:'box',name:'box',component:Box},
        {path:'dress',name:'dress',component:Dress},
        {path:'ele',name:'ele',component:Ele},
        {path:'food',name:'food',component:Food},
        {path:'general',name:'general',component:General},
        {path:'man',name:'man',component:Man},
        {path:'mbaby',name:'mababy',component:Mbaby},
        {path:'shirt',name:'shirt',component:Shirt},
        {path: '/home', redirect:'/home/hot',}
      ]
    },
    {
      path: '/chat',
      name: 'chat',
      component: Chat
    },
    {
      path: '/me',
      name: 'me',
      component: Me
    },
    {
      path: '/recommend',
      name: 'recommend',
      component: Recommend
    },
    {
      path: '/search',
      name: 'search',
      component: Search
    },
    {
      path: '/',
      redirect: '/home'
    }
  ]
})
